package net.csdra.personnel.service;

import net.csdra.basis.Utils;
import net.csdra.basis.domain.CJpaRepository;
import net.csdra.basis.service.CurrentUserInfo;
import net.csdra.basis.service.ServiceBaseInterfaceImpl;
import net.csdra.personnel.domain.Team;
import net.csdra.personnel.domain.TeamRepository;
import net.csdra.personnel.service.form.CreateTeam;
import net.csdra.personnel.service.form.UpdateTeam;

/**
 * Created by msf on 2018/1/31.
 */
public class TeamManageServiceImpl extends ServiceBaseInterfaceImpl<Team, CreateTeam, UpdateTeam> implements TeamManageService {
    TeamRepository repository;

    public TeamManageServiceImpl(TeamRepository jpaRepository, CurrentUserInfo currentUserInfo) {
        super(Team.class, jpaRepository, currentUserInfo);
        this.repository = jpaRepository;
    }

//    @Override
//    public Team create(CreateTeam createTeam) {
//        //TODO 补充断言
//        Team team = super.create(createTeam);
//        //TODO 补充剩余team属性
//        repository.save(team);
//        Team result = new Team();
//        Utils.copyProperties(team, result);
//        return result;
//    }
//
//    @Override
//    public Team update(UpdateTeam updateTeam) {
//        //TODO 补充断言
//        Team team = super.update(updateTeam);
//        //TODO 补充剩余team属性
//        repository.save(team);
//        Team result = new Team();
//        Utils.copyProperties(team, result);
//        return result;
//    }
}
